package com.healthcloud.dao.accompany;

import com.healthcloud.dao.BaseDao;
import com.healthcloud.entity.accompany.AccompanyBlEntity;
import com.healthcloud.entity.accompany.AccompanyBlVo;
import com.healthcloud.utils.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangjie
 */
public interface AccompanyBlDao extends BaseDao<AccompanyBlEntity> {

    List<AccompanyBlVo> queryListVo(@Param("entity") AccompanyBlVo entity, @Param("pageParam") PageParam pageParam);

    int queryTotalVo(@Param("entity") AccompanyBlVo entity);

    AccompanyBlVo queryObjectVo(@Param("id") Long id);

    List queryRemindList(@Param("entity") AccompanyBlVo entity, @Param("pageParam") PageParam pageParam);

    Integer queryRemindTotal(@Param("entity") AccompanyBlVo entity);

    void deleteByIds(@Param("idList") List<Long> accompanyBLIds);

    /**
     * 根据身份证号，查询上一次有药物骨松随访的 id
     * @param idCard
     * @return
     */
    Integer getLastBlIdWithMedical(@Param("idCard") String idCard, @Param("hasMedicalFlag") Integer hasMedicalFlag);

    /**
     * 修改病人身份证号
     * @param oldIdCard 修改前身份证号
     * @param newIdCard 修改后身份证号
     */
    void updateIdCard(@Param("newIdCard") String newIdCard, @Param("oldIdCard") String oldIdCard);
}